﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Theme="SkinFile" Inherits="Nivdal.TranslateInterface" Title="Web interface translate - nivdal.com!" Codebehind="TranslateInterface.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:HiddenField ID="LanguageHiddenField" runat="server" />
    <asp:Panel runat="server" ID="DirectionPanel" Direction="LeftToRight">
    
    <asp:UpdateProgress ID="TranslateUpdateProgress" runat="server" AssociatedUpdatePanelID="TranslateUpdatePanel">
        <ProgressTemplate>
            <div class="ajaxloader">
                <asp:Image ID="ProgressImage" runat="server" ImageUrl="~/Images/ajax-loader.gif" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    
        
    <asp:UpdatePanel ID="TranslateUpdatePanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:FormView ID="TranslationStatusForumView" runat="server" DataSourceID="TranslationStatusDataSourse">   
            <ItemTemplate>  
                <div class="basic_element">
                <div class="red_title">
                   <asp:Label ID="DataBaseStringsTranslationTitlaLabel" runat="server" Text="Web interface translation section" CssClass="white_title"></asp:Label>
                </div>
                <div class="padding5">
                    <asp:Label ID="LanguageLabel" runat="server" Text='<%# TranslatorString(Eval("Language_Name")) %>'
                     SkinID="InfoLabel"></asp:Label>
                     <br />
                    <asp:Label ID="StatusTitleLabel" runat="server" Text="<%$ Resources:Resource, Translate_StatusTitleLabelText %>"
                     SkinID="InfoLabel"></asp:Label>
                     &nbsp;
                    <asp:Label ID="Statuslabel" runat="server" Text='<%# Eval("InterfaceTranslateStatus") %>' SkinID="GridLabel"></asp:Label>
                     <br />
                    <asp:HyperLink ID="ToTranslationHomePage" runat="server" Text="Back to translation home page"
                     NavigateUrl="~/TranslateMaster.aspx" SkinID="GreenTitleHyperLink"></asp:HyperLink>
                 
                </div>
                </div>
            </ItemTemplate>                
        </asp:FormView>
        <div class="basic_element">
        <div class="red_title">
            <asp:Label ID="MessageLabel" runat="server" CssClass="white_title"></asp:Label>
        </div>
        <div class="padding5">

        
            <asp:FormView ID="TranslateFormView" runat="server" DataSourceID="TranslateDataSource" OnItemCommand="TranslateSentence">
            <ItemTemplate>
                <asp:Panel ID="TranslatePanelForDefaultButton" DefaultButton="TranslateButton" runat="server" >
                <asp:HiddenField ID="SentenceIdHiddenField" runat="server" Value='<%# Eval("SentenceId") %>' />
                <asp:Label ID="NextSentenceTitleLabel" runat="server" Text="Next string to translate is: " SkinID="InfoLabel"></asp:Label>
                <br /><br />
                <asp:Label ID="PageTitleLabel" runat="server" Text="Page: " SkinID="InfoLabel"></asp:Label>
                <asp:Label ID="PageNameLabel" runat="server" Text='<%# Eval("PageName") %>' SkinID="GridLabel"></asp:Label>
                <br />
                <asp:Label ID="ResourceNameTitleLabel" runat="server" Text="String description: " SkinID="InfoLabel"></asp:Label>
                <asp:Label ID="ResourceNameLabel" runat="server" Text='<%# Eval("ResorceName") %>' SkinID="GridLabel"></asp:Label>
                <br />
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="EnglishTextTitleLabel" runat="server" Text="Text in English: " SkinID="InfoLabel"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="EnglishTextLabel" runat="server" Text='<%# GetNivdalData.GetNivdalData.ReplaceLineBreaks(Eval("EnglishText")) %>' 
                            SkinID="GridLabel"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="TranslationTitleLabel" runat="server" Text="Translation:" SkinID="InfoLabel"></asp:Label>
                        </td>
                        <td>
                            <CustomControls:TextArea ID="TranslationTextBox" runat="server" Width="300" Height="80" 
                            TextMode="MultiLine"></CustomControls:TextArea>
                        </td>
                    </tr>
                </table>
                <asp:Button ID="TranslateButton" runat="server" Text="Translate" CommandName="Translate" CssClass="GreenSmallButtonStyle" />
                &nbsp;&nbsp;
                <asp:Button ID="SkipButton" runat="server" Text="Skip" CommandName="Skip" CssClass="GreenSmallButtonStyle" />
                </asp:Panel>
            </ItemTemplate>
        </asp:FormView>
            <br />
            <asp:HyperLink ID="TranslatedSentencesHyperlink" runat="server" Text="All translated sentences" SkinID="GreenTitleHyperLink"
             NavigateUrl="TranslateInterfaceTranslated.aspx" ></asp:HyperLink>
        </div>
        </div>
    </ContentTemplate>
    </asp:UpdatePanel>
    <asp:SqlDataSource ID="TranslateDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    SelectCommand="Nivdal_GetInterfaceSentenceToTranslate" SelectCommandType="StoredProcedure" ></asp:SqlDataSource>
    <asp:SqlDataSource ID="TranslationStatusDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    SelectCommand="Nivdal_GetTranslationStatus" SelectCommandType="StoredProcedure" >
    </asp:SqlDataSource>
    </asp:Panel>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" Runat="Server">   
    <asp:Label ID="PageNameLabel" runat="server" Text="Translate >> Web interface translation" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

